#include <std.h>
#include <system.h>
#include <text.h> 
#include <keyboard.h>
#include <pio.h>
#include <error.h>
#include <memory.h>
#include <cpu.h>
#include <pgtrans.h>
#include <irq.h>
#include <timer.h>
#include <sched.h> 
#include <vol.h>
#include <ksetting.h>

/*Initiating all basic stuff.. Dint initiates all drivers*/


void cl();
int _init()
{
	init_video();
	printk("\nInitiating...");
	init_mm();	//Crucial for all the linked lists and dynamic allocations
	init_system();
	text_buf_init();
	set_init();
	init_mm2();	/*Memory management settings (setting machine has to be initiated after init_mm since it uses linked lists. But to add the memory management settings mm section needs to be called again after the initiation of the settings machine.*/
	init_biosi();	/*The real mode bios call interface*/
	init_pg();
	init_irq();
	init_timer();	
	init_sched();
	/*init_sched never returns.. A new process post_sched_init starts..*/
	return NULL;
}

void psyme_init();
void init_systat_update();
void post_sched_init()
{
	/*Load basic drivers*/
	init_cpu();
	init_pci();
	init_dint();
	init_vol();	/*Volume manager..Basically partition table reader*/
	cl();
}
